package com.hpeng.daily.dao.impl;

import org.springframework.stereotype.Component;
import com.hpeng.daily.dao.AssetCardDao;
import com.hpeng.sys.model.AssetCard;
import com.hpeng.util.GenericDaoImpl;
import com.hpeng.util.Pagination;

@Component("assetCardDao")
public class AssetCardDaoImpl extends GenericDaoImpl<AssetCard, String>
		implements AssetCardDao {

	public Pagination<AssetCard> getPagination(int pageNumber, String[] hql,
			String order) {
		Pagination<AssetCard> pagination = null;
		StringBuffer sb = new StringBuffer();
		try {
			for (String str : hql) {
				sb.append(str);
			}
			pagination = this.getPagination(sb.toString() + order, null, pageNumber);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return pagination;
	}
	
}
